home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / OWLSRC.PAK / DECMDIFR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.3 KB  |  87 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1992, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.5  $
  6. //
  7. // Implementation of class TDecoratedMDIFrame
  8. //----------------------------------------------------------------------------
  9. #pragma hdrignore SECTION
  10. #include <owl/pch.h>
  11. #if !defined(OWL_DECMDIFR_H)
  12. # include <owl/decmdifr.h>
  13. #endif
  14.  
  15. OWL_DIAGINFO;
  16.  
  17. #if !defined(SECTION) || SECTION == 1
  18.  
  19. //
  20. // make sure that TDecoratedFrame is first in the list so we find its
  21. // WM_SIZE handler
  22. //
  23. DEFINE_RESPONSE_TABLE2(TDecoratedMDIFrame, TDecoratedFrame, TMDIFrame)
  24. END_RESPONSE_TABLE;
  25.  
  26. TDecoratedMDIFrame::TDecoratedMDIFrame(const char far* title,
  27.                                        TResId          menuResId,
  28.                                        TMDIClient&     clientWnd,
  29.                                        bool            trackMenuSelection,
  30.                                        TModule*        module)
  31. :
  32.   TMDIFrame(title, menuResId, clientWnd, module),
  33.   TDecoratedFrame(0, title, &clientWnd, trackMenuSelection, module),
  34.   TFrameWindow(0, title, &clientWnd, false, module),
  35.   TWindow(0, title, module)
  36. {
  37. }
  38.  
  39. //
  40. //
  41. //
  42. TResult
  43. TDecoratedMDIFrame::DefWindowProc(uint message, TParam1 param1, TParam2 param2)
  44. {
  45.   //
  46.   // ::DefFrameProc() will response to WM_SIZE by making the MDI client the
  47.   // same size as the client rectangle; this conflicts with what TLayoutWindow
  48.   // has done
  49.   //
  50.   return message == WM_SIZE ?
  51.                       0 :
  52.                       TMDIFrame::DefWindowProc(message, param1, param2);
  53. }
  54.  
  55. #endif
  56. #if !defined(SECTION) || SECTION == 2
  57.  
  58.  
  59. IMPLEMENT_STREAMABLE4(TDecoratedMDIFrame, TMDIFrame, TDecoratedFrame,
  60.                       TFrameWindow, TWindow);
  61. #if !defined(BI_NO_OBJ_STREAMING)
  62.  
  63. //
  64. //
  65. //
  66. void*
  67. TDecoratedMDIFrame::Streamer::Read(ipstream& is, uint32 /*version*/) const
  68. {
  69.   ReadBaseObject((TMDIFrame*)GetObject(), is);
  70.   ReadBaseObject((TDecoratedFrame*)GetObject(), is);
  71.   return GetObject();
  72. }
  73.  
  74. //
  75. //
  76. //
  77. void
  78. TDecoratedMDIFrame::Streamer::Write(opstream& os) const
  79. {
  80.   WriteBaseObject((TMDIFrame*)GetObject(), os);
  81.   WriteBaseObject((TDecoratedFrame*)GetObject(), os);
  82. }
  83.  
  84. #endif  // if !defined(BI_NO_OBJ_STREAMING)
  85.  
  86. #endif
  87.